package com.jk.smartelderlycare.controller;

import com.jk.smartelderlycare.dto.SysLabel;
import com.jk.smartelderlycare.dto.sysVideo;
import com.jk.smartelderlycare.interfaces.SysVideoServiceApi;
import com.jk.smartelderlycare.pojo.PagedResponse;
import com.jk.smartelderlycare.service.SysVideoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author hhk
 * @version 1.0
 * @ClassName SysVideoController
 * @program: smart-elderly-care
 * @description: TODO
 * @date 2024/11/15 9:22
 */
@RestController
@Slf4j
public class SysVideoController implements SysVideoServiceApi {
    @Autowired
    private SysVideoService sysVideoService;
    /**
     * @description: 后端分页查询
     * @param: [video, pageNum, pageSize]
     * @return: com.jk.smartelderlycare.pojo.PagedResponse<com.jk.smartelderlycare.dto.sysVideo>
     * @author hhk
     * @date: 2024/11/15 9:22
     */
    @Override
    public PagedResponse<sysVideo> findSysVideoPaginationList(sysVideo video, Integer pageNum, Integer pageSize) {
        return sysVideoService.findSysVideoPaginationList(video,pageNum,pageSize);
    }
    /**
     * @description: 新增
     * @param: [video]
     * @return: void
     * @author hhk
     * @date: 2024/11/15 9:24
     */
    @Override
    public void addSysVideo(sysVideo video) {
        sysVideoService.addSysVideo(video);
    }
    /**
     * @description: 根据id删除
     * @param: [videoId]
     * @return: void
     * @author hhk
     * @date: 2024/11/15 9:24
     */
    @Override
    public void deleteSysVideoByVideoId(Long videoId) {
        sysVideoService.deleteSysVideoByVideoId(videoId);
    }
    /**
     * @description: 根据id回显
     * @param: [videoId]
     * @return: com.jk.smartelderlycare.dto.sysVideo
     * @author hhk
     * @date: 2024/11/15 9:24
     */
    @Override
    public sysVideo findSysVideoByVideoId(Long videoId) {
        return sysVideoService.findSysVideoByVideoId(videoId);
    }
    /**
     * @description: 修改
     * @param: [video]
     * @return: void
     * @author hhk
     * @date: 2024/11/15 9:25
     */
    @Override
    public void updateSysVideo(sysVideo video) {
        sysVideoService.updateSysVideo(video);
    }
    /**
     * @description: 标签动态下拉
     * @param: []
     * @return: java.util.List<com.jk.smartelderlycare.dto.SysLabel>
     * @author hhk
     * @date: 2024/11/15 9:25
     */
    @Override
    public List<SysLabel> findSysLabelList() {
        return sysVideoService.findSysLabelList();
    }
    /**
     * @description: 批量删除
     * @param: [ids]
     * @return: void
     * @author hhk
     * @date: 2024/11/15 11:11
     */
    @Override
    public void deleteSysVideoByIds(List<Integer> ids) {
        sysVideoService.deleteSysVideoByIds(ids);
    }
    /**
     * @description: 导出
     * @param: []
     * @return: java.util.List<com.jk.smartelderlycare.dto.sysVideo>
     * @author hhk
     * @date: 2024/11/15 11:53
     */
    @Override
    public List<sysVideo> findSysVideoList() {
        return sysVideoService.findSysVideoList();
    }


}
